package com.aly.beanValidate.core.validator.impl;

import com.aly.beanValidate.core.FieldDefinition;
import com.aly.beanValidate.core.GlobalConfigs;
import com.aly.beanValidate.core.validator.CheckValidator;
import com.aly.beanValidate.i.BeanInfo;
import com.aly.beanValidate.i.FileInfo;
import com.aly.beanValidate.i.FileInfos;
import org.dom4j.Element;

public abstract class ArrayValidator extends CheckValidator {
    ArrayValidator(Element element, GlobalConfigs globalConfigs) {
        super(element, globalConfigs);
    }

    public final StringBuffer doValidate(FieldDefinition field, Object val, BeanInfo bean, FileInfo fileInfo, FileInfos fileInfos) {
        return doValidate(field, ((String[]) val), bean, fileInfo, fileInfos);
    }

    public abstract StringBuffer doValidate(FieldDefinition field, String[] val, BeanInfo bean, FileInfo fileInfo, FileInfos fileInfos);
}